import {RequestAxios} from "../utils/request"
import {
  FriendCardParams,
  FriendCards,
  RecommendParams,
  RecommendResult,
  TodayBestResult,
} from "../types/friend"

export const getRecommendListAPI = (params: RecommendParams) =>
  RequestAxios.get<RecommendResult>("/friends/recommendation", params)

export const getTodayBestAPI = () =>
  RequestAxios.get<TodayBestResult>("/friends/todayBest")

export const getFriendCardAPI = (params: FriendCardParams) =>
  RequestAxios.get<FriendCards>("/friends/cards", params)

export const likeOrDislikeAPI = (id: number, type: "like" | "dislike") =>
  RequestAxios.get<FriendCards>(`/friends/like/${id}/${type}`)
